SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 45360: Code might be incorrectly parsed when a macro variable definition includes an %STR function when used with the SQL procedure

DetailsAboutRate It

Using the SQL procedure (PROC) to subset a table using a macro variable that contains a DATETIME constant within the %STR function might result in an error. The problem occurs if the DATETIME constant within the %STR function does not include the quotation marks and the DT. These are used to signify that the literal is a DATETIME constant. Under these circumstances, you might see the following error:

ERROR: Expression using greater than (>) has components that are of different
data types.

This problem occurs when the DT from the original PROC SQL code is removed from the DATETIME constant after the code has been parsed by the SQL procedure. As a result, the constant value is treated as a character literal and not as a DATETIME constant.

To work around this issue, include the quotation marks and the DT in the original macro definition rather than in the PROC SQL code.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.1 TS1M3 SP49.3 TS1M2
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP49.3 TS1M2
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP49.3 TS1M2
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP49.3 TS1M2
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP49.3 TS1M2
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP49.3 TS1M2
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP49.3 TS1M2
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP49.3 TS1M2
Microsoft Windows XP Professional9.1 TS1M3 SP49.3 TS1M2
Windows Vista9.1 TS1M3 SP49.3 TS1M2
Windows Vista for x649.1 TS1M3 SP49.3 TS1M2
64-bit Enabled AIX9.1 TS1M3 SP49.3 TS1M2
64-bit Enabled HP-UX9.1 TS1M3 SP49.3 TS1M2
64-bit Enabled Solaris9.1 TS1M3 SP49.3 TS1M2
HP-UX IPF9.1 TS1M3 SP49.3 TS1M2
Linux9.1 TS1M3 SP49.3 TS1M2
Linux on Itanium9.1 TS1M3 SP49.3 TS1M2
OpenVMS Alpha9.1 TS1M3 SP49.3 TS1M2
Solaris for x649.1 TS1M3 SP49.3 TS1M2
Tru64 UNIX9.1 TS1M3 SP49.3 TS1M2
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.